﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Lcbo.Web
{
    public partial class Page1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            List<string> items = new List<string>();
            for (int i = 0; i < 1000; i++)
            {
                items.Add(String.Format("{0}", i + 1));
            }

            this.gridItems.DataSource = items;
            this.gridItems.DataBind();
        }

        protected void ButtonNextPage_Click(object sender, EventArgs e)
        {
            Server.Transfer("Page2.aspx");
        }

        protected void gridItems_PageIndexChanged(object sender, EventArgs e)
        {
            this.gridItems.DataBind();
        }

        protected void gridItems_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            this.gridItems.PageIndex = e.NewPageIndex;
        }
    }
}